<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        22222
    </div>
    <ul>
        <li>111</li>
        <li>222</li>
        <li>333</li>
    </ul>
    <script>
        //target与this的区别
        //e.target点击了那个元素就返回哪一个元素   e.this哪个元素绑定了点击事件就返回哪个元素
        

        var div = document.querySelector('div');
        var ul = document.querySelector('ul');
        var li = document.querySelector('li')

        div.addEventListener('click',function(e){
            // console.log(e.target);
            console.log(this);

        })
        ul.addEventListener('click',function(e){
            // console.log(this);
            // console.log(e.target);

        })
    </script>
</body>
</html>